home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / BBS / BDUWCD10.ZIP / COLORMEN.DOC < prev    next >
Encoding:
Text File  |  1996-04-22  |  6.3 KB  |  140 lines

  1. * <--- The splat indicates black color so this line is written in black.
  2. The *[Y] indicates to read a key and display following lines,  
  3. if a Y response is recieved.  
  4.        Syntax  : *[uppercase character]
  5.        Examples: *[Y]  *[N]  *[Q]
  6.  
  7.  The following variables can be changed on the response line:
  8.            Variable         Range          Functions
  9.        c charm/personality  0-10        >  add 1
  10.        d cash in hand       0-up        <  sub 1
  11.        f fights             0-50        ]  add 5
  12.        h hit points         0-250       [  sub 5
  13.        m max hit points     0-250       }  add 10
  14.        n defense (luck)     0-4         {  sub 10
  15.        p power              0-16        x  double
  16.        s skill              0-10        /  split (tosses the remainder)
  17.                                         0  zero variable
  18.  
  19.  You can use these in any *.MEN file in Underworld Version 1.0, and the
  20.  language is case sensitive!
  21.  
  22. *Example no.1  addition
  23. *This menu will prompt the user for a Y or N response
  24. *If answered Yes it will heal the play to Max and give them 200 dollars
  25. * D means to start with the cash they have and each } means add 10 to it
  26. * d tells it to place that value into the cash value.
  27. *REMBER!! color codes are ~ @ # $ % ^ & + * Avoid using except for color!
  28. +^Want to be healed? ^[y/N]
  29. *[Y] Mh D}}}}}}}}}}}}}}}}}}}}d
  30. +$You now have all your hitpoint and 200 dollars!
  31. *ELSE <-- This command will display the other line below if Y wasn't pressed
  32. +% SUCKER!!
  33. * Blank line
  34.  
  35. *Example no.2 Zero a value
  36. *This menu will prompt the user for a Q to quit then sets the 
  37. *hitpoints to zero thereby killing the player.  
  38. Do you wish to quit? [q/N]
  39. *[Q] 0h
  40. *To give the player a set number of hit points you can start at zero and
  41. *add them Ex: 0 } ] > > h would start at zero give the player 17 hitpoints
  42. * 0 = start with a value of zero } = add 10 ] = add 5 > = add 1
  43. * > = add 1 h = place value in hitpoints.
  44.  
  45. *NOTE: All values must either start 0, C, D, F, H, M, N, P or S.
  46. *      Values are only changed when c, d, f, h, m, n, p or s is used.
  47.  
  48. *Example no.3  Moving Values
  49. *This shows how to transfer a value into another.  The uppercase value
  50. *shows where to start.  Here we give the player 8 times hitpoints in cash.
  51. You have found a +@lottery ticket+&, to see if you have won
  52. just press a key from A to Z!
  53. *[G] H x x x d
  54. +@YOU +^WON!
  55. * As you can see the [G] is the secret key and should be change once in a
  56. * while.  We start with a value of H and double it 3 times.
  57. * (Ex: 10 x 2 x 2 x 2 = 80) This would be unfourtunate if the player is 
  58. * holding over 80 dollars in his hand, since that money would disappear.
  59. * It would be better to double the money they have like this:
  60. *[G] D x d
  61. *ELSE
  62. +$You lost.
  63.  
  64. Well that's about it, I have listed the source code for the procedure below
  65. to help you understand it any better.  I hope the Sysops like this feature
  66. and hope to do more with it in the future versions.
  67.  
  68. SOURCE CODE IN PASCAL
  69. =====================
  70. while not eof (tempfile) do
  71.         begin
  72.              readln (tempfile,st);
  73.              if copy (st,1,5) = '*ELSE' then
  74.                 dis_on := not dis_on;                {Toggle Display}
  75.              if (st[2] = '[') and (st[4] = ']') then
  76.                 begin
  77.                      sread_char (ch);
  78.                      if upcase (ch) <> st[3] then
  79.                         dis_on := false              {Do not Display}
  80.                      else
  81.                         with caller[1] do
  82.                              begin
  83.                                   for i := 5 to length (st) do
  84.                                       begin
  85.                                            case st[i] of
  86.                                                 'C': a := charm;
  87.                                                 'D': a := cash;
  88.                                                 'F': a := fights;
  89.                                                 'H': a := hitpts;
  90.                                                 'M': a := maxhpt;
  91.                                                 'N': a := defense;
  92.                                                 'P': a := power;
  93.                                                 'S': a := skill;
  94.                                                 '0': a := 0;
  95.                                            end;
  96.                                            case st[i] of
  97.                                                 '>': inc (a);
  98.                                                 '<': dec (a);
  99.                                                 ']': inc (a,5);
  100.                                                 '[': dec (a,5);
  101.                                                 '}': inc (a,10);
  102.                                                 '{': dec (a,10);
  103.                                                 'x': inc (a,a);
  104.                                                 '/': a := a div 2;
  105.                                            end;
  106.                                            if a < 0 then
  107.        {No value must drop below 0}           a := 0;
  108.        {Set Limits}                        case st[i] of
  109.        {Charm no higher than 10   }             'c': if a<=10 then
  110.                                                         charm   := a;
  111.        {No limit on Cash          }             'd': cash    := a;
  112.        {Fights per day 50 Max     }             'f': if a<=50 then
  113.                                                         fights  := a;
  114.        {Hit Points 250 Max        }             'h': if a<=250 then
  115.                                                         hitpts  := a;
  116.        {Max HP 250 Max            }             'm': if a<=250 then
  117.                                                         maxhpt  := a;
  118.        {Defense or Dumb Luck 4 Max}             'n': if a<=4 then
  119.                                                         defense := a;
  120.        {Power Bonus 16 Max        }             'p': if a<=16 then
  121.                                                         power   := a;
  122.        {Job Skills 10 Max         }             's': if a<=10 then
  123.                                                         skill   := a;
  124.                                            end;
  125.                                       end;
  126.                              end;
  127.                 end;
  128.              if dis_on then
  129.                 write_color (st);
  130.         end;
  131. close (tempfile);
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.